﻿Imports Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine

Public Class CheckSerialNum
    Public Shared Sub Checkserialnum(ByVal connection As WqlConnectionManager, ByVal serialnum As String, ByVal RDP As Boolean)
        Dim resId As String = Nothing
        Dim objbios =
                connection.QueryProcessor.ExecuteQuery(
                    "select * from SMS_G_System_PC_BIOS where SMS_G_System_PC_BIOS.SerialNumber = '" & serialnum & "'")
        For Each resbios In objbios
            resId = resbios.Properties("ResourceID").stringvalue().ToString()
        Next
        GetSMSProvideData.Getcomsys(connection, "ResourceID = '" & resId & "'", RDP)
    End Sub
End Class
